package com.john.cloud.feigin.receiver;

import com.john.cloud.feigin.entity.User;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author: JohnCoding
 * @Description:
 * @date: 2020/4/24 17:23
 */
@Component
@RabbitListener(queues = "object")
public class UserReceiver {

    @RabbitHandler
    public void receiver(User user){
        System.out.println("Receiver object"+user.toString());
    }

}
